package cn.hou.java.designpattern._19status;

public class Test {
	public static void main(String[] args) {
		Person person=new Person();
		person.setTime(7);
		person.eat();
		person.setTime(12);
		person.eat();
		person.setTime(17);
		person.eat();
		person.setTime(22);
		person.eat();
		person.setTime(7);
		person.eat();
		//全部交给状态类解决,客户端不必判断,person对象也不用
	}

}
